#import "./iteration_report.fragment.graphql"

query Iteration($fullPath: ID!, $id: ID!, $isGroup: Boolean = true) {
  group(fullPath: $fullPath) @include(if: $isGroup) {
    id
    iterations(id: $id, first: 1, includeAncestors: true) {
      nodes {
        ...IterationReport
      }
    }
  }

  project(fullPath: $fullPath) @skip(if: $isGroup) {
    id
    iterations(id: $id, first: 1, includeAncestors: true) {
      nodes {
        ...IterationReport
      }
    }
  }
}
